package com.roger.homecenterscreen.data.model

data class WeatherData(
    val currentWeather: CurrentWeather,
    val todayHourly: List<HourlyWeather>,
    val todaySummary: DailyForecast?, // 今天的天气总结（最高最低气温等）
    val forecast: List<DailyForecast>, // 未来天气（不包含今天）
    val airQuality: AirQuality,
    val location: WeatherLocation = WeatherLocation()
)

data class WeatherLocation(
    val city: String = "未知城市",
    val district: String = "",
    val country: String = "中国"
) {
    fun getDisplayName(): String {
        return if (district.isNotEmpty()) {
            "$city $district"
        } else {
            city
        }
    }
}

data class CurrentWeather(
    val temperature: Int, // 当前温度
    val feelsLike: Int, // 体感温度
    val humidity: Int, // 湿度百分比
    val pressure: Int, // 气压
    val visibility: Int, // 能见度
    val uvIndex: Int, // 紫外线指数
    val windSpeed: Int, // 风速
    val windDirection: String, // 风向
    val weatherCode: String, // 天气代码
    val weatherDesc: String, // 天气描述
    val icon: String // 天气图标
)

data class HourlyWeather(
    val time: String, // 时间，如 "09:00"
    val temperature: Int,
    val weatherCode: String,
    val weatherDesc: String,
    val icon: String,
    val precipitation: Int // 降水概率
)

data class DailyForecast(
    val date: String, // 日期，如 "12-25"
    val dayOfWeek: String, // 星期，如 "周一"
    val maxTemp: Int,
    val minTemp: Int,
    val weatherCode: String,
    val weatherDesc: String,
    val icon: String,
    val precipitation: Int // 降水概率
)

data class AirQuality(
    val aqi: Int, // 空气质量指数
    val level: String, // 质量等级，如 "良"
    val pm25: Int,
    val pm10: Int,
    val so2: Int,
    val no2: Int,
    val co: Float,
    val o3: Int
) 